package com.jyw.business.obstacles.controller;

import com.github.pagehelper.PageHelper;
import com.jyw.business.obstacles.domain.dto.web.CallRecordPageDto;
import com.jyw.business.obstacles.domain.vo.web.CallRecordPageVO;
import com.jyw.business.obstacles.service.IObsOrderInfoService;
import com.jyw.common.core.controller.BaseController;
import com.jyw.common.core.page.TableDataInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * @author w_q
 * @date 2023/8/1416:45
 * @Description:
 */
@Api(tags = "通话管理")
@RestController
@RequestMapping("/obstacles/call")
public class ObsCallController extends BaseController {


    @Autowired
    private IObsOrderInfoService iObsOrderInfoService;


    @PreAuthorize("@ss.hasPermi('obstacles:call:recordList')")
    @PostMapping("/recordList")
    @ApiOperation("查询通话记录")
    public TableDataInfo<CallRecordPageVO> recordList(@RequestBody CallRecordPageDto dto) {
        PageHelper.startPage(dto.getPageNum(), dto.getPageSize()).reasonable(true);
        List<CallRecordPageVO> list = iObsOrderInfoService.selectRecordList(dto);
        return getDataTable(list);
    }


}
